
<?php
include '../base/validateAgentLogin.php';
include '../class/MMysql.php';
if (isset($_COOKIE["agent_id"]))
    $agent_id= $_COOKIE["agent_id"];
if (isset($_COOKIE["agent_name"]))
    $agent_name= $_COOKIE["agent_name"];

$mysql = new MMysql();
$res = $mysql
    ->where(array('agent_id'=>$agent_id,"del_flag"=>0))
    ->select('agent');
?>



<?php
  include '../base/layout.php';
?>


<body>

<?php
include '../base/agentheader.php';
?>

<section style="width: 100%;">

    <?php

    include '../base/agentsidemenu.php';

    ?>

    <aside class="content">

        <div style="margin-top: 20px;position: relative;">

            <div style="height: 20px;">

            </div>
            <div style="margin-top: 30px;margin-left: 100px;">
                 <span style="font-size: 30px;">
                        Settings
                 </span>
            </div>

            <div style="margin-top: 20px;margin-left: 100px;">
                <span style="font-size: 20px;color: rgb(154,154,154);">
                    <?php
                    echo $agent_name;
                    ?>
                </span>
                <a href="settings_page_edit.php">
                    <button class="btn" style="background-color: #2B2B2B;color:white;width: 100px;margin-left: 50px;">
                        EDIT
                    </button>
                </a>
            </div>

            <div style="margin-top: 20px;margin-left: 100px;">
                <span class="user_info_span">
                    The company full name
                </span>
                <?php

                echo '<input readonly="readonly" class="user_info_input" type="text" value="'.$res[0]['agent_name'].'">'
                ?>

            </div>

            <div style="margin-top: 20px;margin-left: 100px;">
                <span class="user_info_span">
                    Tel
                </span>
                <?php

                echo '<input readonly="readonly" class="user_info_input" type="text" value="'.$res[0]['agent_tel'].'">'
                ?>

            </div>

            <div style="margin-top: 20px;margin-left: 100px;">
                <span class="user_info_span">
                    Email
                </span>
                <?php
                echo '<input readonly="readonly" class="user_info_input" type="text" value="'.$res[0]['agent_email'].'">'
                ?>

            </div>


            <div style="margin-top: 60px;margin-left: 100px;">
                <span style="position: relative;line-height: 34px;font-size:20px;color: rgb(152,152,152);display: block;">
                    change my password
                </span>

                <input onclick="topassword()" type="text" class="form-control" style="margin-top: 10px;width: 400px;"
                       placeholder="click here to change my password">
            </div>

    </aside>

    <div style="clear: both;">
    </div>

</section>

</body>
</html>

<script>
    function topassword() {

        window.location.href='settings_page_password.php';
    }
</script>


